package com.sss.hloster03;

public class Student {
//属性
	// 成员变量
	private String stuName;
	private String stuSex;
	private double stuScore;

	// 成员内部类：如果是private 只能是本类使用
	public class StuFamily {
		// 属性
		private String stuMatherName;
		private String stuFatherName;
		private String stuFamilyAddress;

		// 行为
		/**
		 * 获取学生家庭信息行为
		 */
		public String getStuFamilyInfo() {
			// 成员内部类可以直接访问外部类的成员变量
			String str = "学生：：" + stuName + "的家庭信息为：：" + this.toString();
			return str;
		}

		public StuFamily(String stuMatherName, String stuFatherName, String stuFamilyAddress) {
			super();
			this.stuMatherName = stuMatherName;
			this.stuFatherName = stuFatherName;
			this.stuFamilyAddress = stuFamilyAddress;
		}

		public String getStuMatherName() {
			return stuMatherName;
		}

		public void setStuMatherName(String stuMatherName) {
			this.stuMatherName = stuMatherName;
		}

		public String getStuFatherName() {
			return stuFatherName;
		}

		public void setStuFatherName(String stuFatherName) {
			this.stuFatherName = stuFatherName;
		}

		public String getStuFamilyAddress() {
			return stuFamilyAddress;
		}

		public void setStuFamilyAddress(String stuFamilyAddress) {
			this.stuFamilyAddress = stuFamilyAddress;
		}
		public String toString() {
			return "StuFamily[stuMatherName=  "+stuMatherName+"  ,stuFather="+stuFatherName+
					"   , stuFamilyAddress=  "+stuFamilyAddress+"]";
		
		}

	}

	// 行为
	/**
	 * 学习行为
	 */
	public void doStuding() {
		System.out.println(this.stuName + "  is   studing..........");
	}

	public void printMeInfo() {
    StuFamily  stuF=new StuFamily("张三妈妈","张三爸爸","天津西青");
    System.out.println(stuF.getStuFamilyInfo());
	}

	public Student(String stuName, String stuSex, double stuScore) {
		super();
		this.stuName = stuName;
		this.stuSex = stuSex;
		this.stuScore = stuScore;
	}

	public Student() {
		super();
	}

	public String getStuName() {
		return stuName;
	}

	public void setStuName(String stuName) {
		this.stuName = stuName;
	}

	public String getStuSex() {
		return stuSex;
	}

	public void setStuSex(String stuSex) {
		this.stuSex = stuSex;
	}

	public double getStuScore() {
		return stuScore;
	}

	public void setStuScore(double stuScore) {
		this.stuScore = stuScore;
	}

}
